package com.wang.common.types;


import java.util.ArrayList;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public abstract class AbstractParser<T> implements Parser<T> {


	public T parse(String content) throws JSONException {
		throw new JSONException("Unexpected JSONArray parse type encountered.");
	}
	
    public T parse(JSONObject json) throws JSONException {
        throw new JSONException("Unexpected JSONArray parse type encountered.");
    }
    
    public ArrayList<T> parse(JSONArray array) throws JSONException {
        throw new JSONException("Unexpected JSONArray parse type encountered.");
    }
    
    
    public T parseArray(JSONArray keyArray, JSONArray valueArray) throws JSONException {
        throw new JSONException("Unexpected JSONArray parse type encountered.");
    }
    
    
    public ArrayList<T> parseGroupArray(JSONArray array) throws JSONException {
        throw new JSONException("Unexpected JSONArray parse type encountered.");
    }
    public ArrayList<T> parseArrayListFromJsonStr(String content)throws JSONException{
    	 throw new JSONException("Unexpected JSONArray parse type encountered.");
    }
}
